<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <button v-on:click="decrement">-</button>
    {{ count }}
    <button v-on:click="increment">+</button>
    <Demo />
  </div>
</template>

<script lang="ts">
import { Options, Vue } from "vue-class-component";
import Demo from "@/components/Demo"; // @ is an alias to /src
@Options({
  props: {
    msg: String,
  },
  components: {
    Demo,
  },
})
export default class HelloWorld extends Vue {
  msg!: string;
  count: number = 3;

  // Methods will be component methods
  increment() {
    this.count++;
  }

  decrement() {
    this.count--;
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
